var mongoose = require('../dao/mongo/mongo');

var Schema = mongoose.Schema;
var AchievementApply = new Schema({
    aid: {
        type: String,
        default: '',
        tags: {type: [String], index: true}
    },
    uid: {
        type: String,
        default: '',
        tags: {type: [String], index: true}
    },
    task_name: {
        type: String,
        default: ''
    },
    task: {
        type: Schema.Types.Mixed,
        default: {}
    },
    //状态1待审核、2审核通过、3审核拒绝
    status: {
        type: Number,
        default: 1
    },
    //审核时间
    audit_time: {
        type: Date,
        default: Date.now()
    },
    gmt_create: {
        type: Date,
        default: Date.now()
    },
    gmt_modified: {
        type: Date,
        default: Date.now()
    }
}, {
    collection: "achievement_apply"
});


module.exports = mongoose.model('AchievementApply', AchievementApply);